package com.gobrs.async.core.common.constant;

/**
 * 拒绝的执行处理程序策略枚举
 */
public class RejectedExecutionHandlerConstant {

    /**
     * 由调用者线程去执行
     */
    public static final String CALLER_RUNSPOLICY = "CallerRunsPolicy";

    /**
     * 直接丢弃任务，并抛出RejectedExecutionException异常
     */
    public static final String ABORT_POLICY = "AbortPolicy";

    /**
     * 直接丢弃任务，什么都不做
     */
    public static final String DISCARD_POLICY = "DiscardPolicy";

    /**
     * 抛弃进入队列最早的未处理任务，然后尝试把这次拒绝的任务放入队列
     */
    public static final String DISCARDOLDEST_POLICY = "DiscardOldestPolicy";

}
